//
//  HomeListViewController.m
//  TQY
//
//  Created by 甘世清 on 2024/7/7.
//

#import "HomeListViewController.h"
#import "ZhenYanViewController.h"

@interface HomeListViewController ()

@end

@implementation HomeListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColor.clearColor;
    [self SQ_UIViewForSelfView];
}

- (void)SQ_UIViewForSelfView{
    self.tabBar.backgroundColor = UIColor.whiteColor;
    self.tabBar.leadingSpace = 10;
    self.tabBar.trailingSpace = 10;
    [self.tabBar setScrollEnabledAndItemFitTextWidthWithSpacing:10 minWidth:70];
    self.tabBar.indicatorColor  = SQColor3DA59D;
    [self.tabBar setIndicatorWidth:16 marginTop:32 marginBottom:6 tapSwitchAnimated:YES];
   [self setTabBarFrame:CGRectMake(0, 0, SCREEN_WIDETH,40 )
       contentViewFrame:CGRectMake(0, 40, SCREEN_WIDETH, SCREEN_HEIGHT-TopHeight-FootHeight-50)];
   self.tabBar.itemTitleFont = FONT_SEMIBOLD(16);
    self.tabBar.itemTitleSelectedFont =  FONT_SEMIBOLD(18);
   self.tabBar.itemTitleColor = SQColor(@"#999999");
   self.tabBar.itemTitleSelectedColor = SQColor3DA59D;
    self.tabContentView.defaultSelectedTabIndex = 1;
   [self.tabContentView setContentScrollEnabled:YES tapSwitchAnimated:YES];
   self.tabContentView.loadViewOfChildContollerWhileAppear = YES;
   
    NSArray * array = @[@"精选",@"全部",@"最新"];
    NSMutableArray * arrayVc = [[NSMutableArray alloc]init];
    for (int x = 0; x<array.count; x++) {
        ZhenYanViewController * vc = [[ZhenYanViewController alloc]init];
        vc.yp_tabItemTitle = [array objectAtIndex:x];
        vc.type = [NSString stringWithFormat:@"%d",x];
        [arrayVc addObject:vc];
    }
    self.viewControllers = [[NSMutableArray alloc]initWithArray:arrayVc];
    self.tabContentView.backgroundColor = UIColor.clearColor;

}

@end
